인덱스 컬럼의 가공시는 주의한다. :: 오라클 실습[SSISO Community]
 
SSISO 카페 SSISO Source SSISO 구직 SSISO 쇼핑몰 SSISO 맛집
추천검색어 : JUnit   Log4j   ajax   spring   struts   struts-config.xml   Synchronized   책정보   Ajax 마스터하기   우측부분

오라클 실습
[1]
등록일:2009-05-28 00:06:58 (0%)
작성자:
제목:인덱스 컬럼의 가공시는 주의한다.
인덱스  컬럼을  가공하게  되면  인덱스를  사용하지  못한다.  그러므로  인덱스  컬럼을  가공할  때는  각별히  주의한다.

Select  account_name,  trans_date,  amount
From  Transaction
Where  Substr(account_name,1,7)  =  ‘CAPITAL’;

<개선안>
Select  account_name,  trans_date,  amount
From  Transaction
Where  account_name  like  ‘CAPITAL%’;

Select  account_name,  trans_date,  amount
From  Transaction
Where  amount  !=  0;
<개선안>
Select  account_name,  trans_date,  amount
From  Transaction
Where  amount  >  0;

Select  account_name,  trans_date,  amount
From  Transaction
Where  account_name  ||  account_type  =  ‘MAXA’

<개선안>
Select  account_name,  trans_date,  amount
From  Transaction
Where  account_name  =  ‘MAX’
And  account_type  =  ‘A’;

Select  account_name,  trans_date,  amount
From  Transaction
Where  Trunc(trans_date)  =  Trunc(sysdate)

<개선안>
Select  account_name,  trans_date,  amount
From  Transaction
Where  trans_date  Between  Trunc(sysdate)  and  Trunc(sysdate)  +  .99999;
[본문링크] 인덱스 컬럼의 가공시는 주의한다.
[1]
코멘트(이글의 트랙백 주소:/cafe/tb_receive.php?no=31487
작성자
비밀번호

 

SSISOCommunity

[이전]

Copyright byCopyright ⓒ2005, SSISO Community All Rights Reserved.